<?php

namespace addons\Attend\common\enums;
use common\enums\BaseEnum;

/**
 * 枚举
 *
 * Class GenderEnum
 * @package common\enums
 * @author YiiFrame <21931118@qq.com>
 */
class CheckStateEnum extends BaseEnum
{
    const Absent = 0;
    const Normal = 1;
    const Late = 2;
    const Early = 3;

    /**
     * @return array
     */
    public static function getMap(): array
    {
        return [
            self::Absent => '未打卡',
            self::Normal => '正常',
            self::Late => '迟到',
            self::Early => '早退',

        ];
    }

    public static function getValue($key): string
    {
        return static::getMap()[$key] ?? '';
    }
}